{include 'admin/layout/header_list'}
<link rel="stylesheet" href="__ADMIN_STATIC__/css/addContent.css?random={extendSetting('random')}">
<div class="addcontent">
    <form class="ajaxForm" method="post">
        <input type="hidden" name="_method" value="put">
        <input type="hidden" name="id" value="{if isset($info['id'])}{$info['id']}{/if}" >
        <table class="table">
            <tr>
                <td class="tl">
                    <span><strong>* </strong>id</span>
                </td>
                <td>
                    <select name="pid" id="" class="short">
                        <option value="">选择分类</option>
                        <option value="0"   {if $info} {$info['pid']==0 ?"selected":""} {/if}>无上级</option>
                        {if $adminMenuVal}
                        {foreach $adminMenuVal $key $val}
                        <option value="{$key}"  {if $info} {$info['pid']==$key ?"selected":""} {/if}>{$val}</option>
                        {/foreach}
                        {/if}
                    </select>
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong>* </strong>菜单名称</span>
                </td>
                <td>
                    <input class="long" type="text" name="name" value="{$info?$info['name']:''}">
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong> </strong>图标</span>
                </td>
                <td>
                    <input class="long" type="text" name="icon" value="{$info?$info['icon']:''}">
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong> </strong>排序</span>
                </td>
                <td>
                    <input class="" type="number" name="sort" value="{$info?$info['sort']:''}">
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong>&nbsp;&nbsp;&nbsp;</strong>状态</span>
                </td>
                <td>
                    <p class="article-status" name="status">
                        <input name="status" value="1" type="radio" {if !$info} checked {/if}   {if isset($info['status'])}  {$info['status']==1?"checked":"" } {/if}   >开启
                        <input name="status" value="2" type="radio"  {if isset($info['status'])}  {$info['status']==2?"checked":"" }  {/if} >关闭
                    </p>
                </td>
            </tr>
        </table>
    </form>
    <div class="ltcms-button">
        <button class="btns submit ajaxBtn" type="button" data-submit-url="{LTCMS_ROUTE_PREFIX}/adminMenu" data-form=".ajaxForm" data-location-url="{LTCMS_ROUTE_PREFIX}/adminMenu/index" data-close="5">
            确认保存
        </button>
        <button class="btns cancel">取消并返回</button>
    </div>
</div>
<script src="__ADMIN_STATIC__/js/addContent.js?random={extendSetting('random')}"></script>
{include 'admin/layout/footer'}